﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Joel.Vishnu.Modelo.Entidades;
using Joel.Vishnu.Presentacion;
using Joel.Vishnu.Presentacion.Vistas;

namespace Joel.Vishnu.Formularios
{
    public partial class FacturaDetalles : Form, IFacturaDetalles
    {
        #region Constructores

        public FacturaDetalles(Int32 facturaId)
        {
            InitializeComponent();
            grdFacturaDetalles.AutoGenerateColumns = false;
            grdFacturaDetalles.DataSource = bsFacturaDetalles;
            this.facturaId = facturaId;
        }

        #endregion

        #region Atributos

        private FacturaDetallesPresentador presentador;
        private Int32 facturaId;

        #endregion

        #region Propiedades

        public List<FacturaDetalle> ListaDetalles
        {
            set { bsFacturaDetalles.DataSource = value; }
        }

        public int FacturaId
        {
            get { return facturaId; }
        }

        #endregion

        #region Eventos

        private void FacturaDetalles_Load(Object sender, EventArgs e)
        {
            presentador = new FacturaDetallesPresentador(this);
            presentador.Inicializar();
        }

        #endregion

        
    }
}
